package com.ebupt.migu.fineoperationactivitymonitor.banner2.schedule;

import com.ebupt.migu.fineoperationactivitymonitor.banner2.service.DataBean2ToRedis;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author tz
 */
@Async
@Slf4j
@Component
@EnableScheduling
public class Media2Task {

    @Autowired
    private DataBean2ToRedis dataBean2ToRedis;

    @Scheduled(initialDelay = 3000, fixedDelay = 1000 * 30)
    public void setRedisCache() {
        dataBean2ToRedis.setRedisCache();
    }

}
